package com.Khan.SocialRescueSys.service.impl;

import com.Khan.SocialRescueSys.dao.MessageDao;
import com.Khan.SocialRescueSys.pojo.Message;
import com.Khan.SocialRescueSys.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Khan Liu
 * @date 2022/4/4 19:20
 */
@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessageDao messageDao;

    @Override
    public List<Message> getIndexSkill() {
        return messageDao.getIndexSkill();
    }

    @Override
    public Message getSkill(Long id) {
        return messageDao.getSkill(id);
    }

    @Override
    public List<Message> getNews() {
        return messageDao.getNews();
    }

    @Override
    public Message getNewsDetail(Long id) {
        return messageDao.getNewsDetail(id);
    }

    @Override
    public List<Message> getAllMessages() {
        return messageDao.getAllMessages();
    }

    @Override
    public Message getMessage(Long id) {
        return messageDao.getMessage(id);
    }

    @Override
    public Message getMessageByTitle(String title) {
        return messageDao.getMessageByTitle(title);
    }

    @Override
    public int saveMessage(Message message) {
        return messageDao.saveMessage(message);
    }

    @Override
    public int updateMessage(Message message) {
        return messageDao.updateMessage(message);
    }

    @Override
    public int deleteMessage(Long id) {
        return messageDao.deleteMessage(id);
    }

}
